]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: pre-allocate prompt message height
authorRay Strode <rstrode@redhat.com>
Wed, 19 Jun 2013 16:56:23 +0000 (12:56 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 12 Jul 2013 15:52:39 +0000 (11:52 -0400)
Right now things jump around if a message comes in.
This commit makes sure there's room for a message to start.

https://bugzilla.gnome.org/show_bug.cgi?id=702308

js/gdm/loginDialog.js

index dac355ff26546ce561450c458b41dbc830ac20e9..adb5d5596d6697c7458277ed784b47c6b54121fd 100644 (file)
@@ -506,11 +506,10 @@ const LoginDialog = new Lang.Class({
 
         this._promptEntry.grab_key_focus();
 
-        this._promptMessage = new St.Label({ visible: false });
+        this._promptMessage = new St.Label({ opacity: 0 });
         this._promptBox.add(this._promptMessage, { x_fill: true });
 
         this._promptLoginHint = new St.Label({ style_class: 'login-dialog-prompt-login-hint-message' });
-        this._promptLoginHint.hide();
         this._promptBox.add(this._promptLoginHint);
 
         this._buttonBox = new St.BoxLayout({ style_class: 'modal-dialog-button-box',
@@ -641,7 +640,7 @@ const LoginDialog = new Lang.Class({
         this._userVerifier.clear();
 
         this._updateSensitivity(true);
-        this._promptMessage.hide();
+        this._promptMessage.opacity = 0;
         this._user = null;
         this._verifyingUser = false;
 
@@ -728,20 +727,19 @@ const LoginDialog = new Lang.Class({
         if (message) {
             this._promptMessage.text = message;
             this._promptMessage.styleClass = styleClass;
-            this._promptMessage.show();
+            this._promptMessage.opacity = 255;
         } else {
-            this._promptMessage.hide();
+            this._promptMessage.opacity = 0;
         }
     },
 
     _showLoginHint: function(verifier, message) {
         this._promptLoginHint.set_text(message)
-        this._promptLoginHint.show();
         this._promptLoginHint.opacity = 255;
     },
 
     _hideLoginHint: function() {
-        this._promptLoginHint.hide();
+        this._promptLoginHint.opacity = 0;
         this._promptLoginHint.set_text('');
     },
 
@@ -882,7 +880,7 @@ const LoginDialog = new Lang.Class({
 
         this._setDefaultButtonWellMode(DefaultButtonWellMode.NONE, true);
         this._promptBox.hide();
-        this._promptLoginHint.hide();
+        this._promptLoginHint.opacity = 0;
 
         this._promptUser.set_child(null);
 
@@ -890,7 +888,7 @@ const LoginDialog = new Lang.Class({
         this._promptEntry.set_text('');
 
         this._sessionMenuButton.close();
-        this._promptLoginHint.hide();
+        this._promptLoginHint.opacity = 0;
 
         this._buttonBox.remove_all_children();
         this._signInButton = null;